<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<script type="text/javascript" >
$(function(){
	//上一封
	$('#upNeswDetail').bind('click',function(){
		if(pageer.start==0){
			$.messager.show({
				msg : OA_FRIST_MAIN
			});
			return false;
		}else{
			pageer.start= pageer.start-1;
			$('#bulletinGrid').datagrid('selectRow',pageer.start);
			var row = $('#bulletinGrid').datagrid('getSelected');
			CQOA.load('extendDiv',ctx+'/pof/Bulletin!detail.action',{'entity.sid':row.sid},function(){
				CQOA.hideDiv('mainDiv');
				CQOA.showDiv('extendDiv');
			});
		}
	})
	//下一封
	$('#nextNeswDetail').bind('click',function(){
		if(pageer.pageSize<pageer.total){
			if(pageer.start+1>=pageer.pageSize){
				$.messager.show({
					msg : OA_LAST_MAIN
				});
				return false;
			}
		}else{
			if(pageer.start+1>=pageer.total){
				$.messager.show({
					msg : OA_LAST_MAIN
				});
				return false;
			}
		}
		pageer.start = pageer.start+1;
		$('#bulletinGrid').datagrid('selectRow',pageer.start);
		var row = $('#bulletinGrid').datagrid('getSelected');
		CQOA.load('extendDiv',ctx+'/pof/Bulletin!detail.action',{'entity.sid':row.sid},function(){
			CQOA.hideDiv('mainDiv');
			CQOA.showDiv('extendDiv');
		});
	})
});
</script>    
<div style="width:100%;background-color:#629be2;">

<div id="easyui-title" style="display:none">
	            	公告查看
</div>	
<div class="ggck_button">
		<a href="#" class="easyui-linkbutton"  onclick="comeback();">返回</a>
        <a href="#" class="easyui-linkbutton"  id="upNeswDetail">上一封</a>
        <a href="#" class="easyui-linkbutton"  id="nextNeswDetail">下一封</a>
</div>
<!--公告查看-->
<div class="ggck_bg" style="width:95%" id="mailDetailDiv">

  <div class="ggck_tb">
    <div style="width:100%;height:40px">
      <div  class="ggck_ico"><img src="<s:url value='/images/news/ggck_name.png' />" width="142" height="37" /></div>
    </div>
    <div class="ggck_name"><s:property  value="dto.bulletin.title" /> </div>
    <p class="ggck_line_blue"></p> 
    <div class="ggck_name_sm">
    <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
		     <tr>
		        <td width="15%" height="20" align="left" valign="middle">发布时间:</td>
		        <td width="39%" align="left" valign="middle"><s:date name="dto.bulletin.publishTime" format="yyyy-MM-dd"/></td>
		        <td width="15%" align="left" valign="middle">来源:</td>
		        <td width="31%" align="left" valign="middle"></td>
		     </tr>
		     <tr>
		       <td height="20" align="left" valign="middle">有效期:</td>
		       <td align="left" valign="middle"><s:date name="dto.bulletin.beginTime" format="yyyy-MM-dd"/></td>
		       <td align="left" valign="middle">至:</td>
		       <td align="left" valign="middle"><s:date name="dto.bulletin.endTime" format="yyyy-MM-dd"/></td>
		     </tr>
		     <tr>
		       <td height="20" align="left" valign="middle">作者:</td>
		       <td align="left" valign="middle"><s:property escape="true" value="dto.bulletin.createUser" /></td>
		       <td align="left" valign="middle">查看范围:</td>
		       <td align="left" valign="middle">
		       			<s:if test="null != dto.bulletinScopes">
	                    	<s:iterator value="dto.bulletinScopes" var="scope">
	                    		${scope.objectCname}
	                    	</s:iterator>
                    	</s:if>
               </td>
		     </tr>
		     <s:if test="null !=dto.smFiles && dto.smFiles.size() > 0">
		     			<tr>
					       <td height="20" align="left" valign="middle">附件下载:</td>
					       <td align="left" valign="middle" colspan="3">
						       	<s:iterator value="dto.smFiles" id='filement' var="filement">
		              		 		 <a style="color: blue;" href="#" onClick="downloadFun(${filement.sid});" >${filement.cname}</a>
		              		 		 <br />
	                  			</s:iterator>
					       </td>

					     </tr>
    		</s:if>
	</table>
    </div>          
     <p  style="height:20px;" >&nbsp;</p>
  	 <div class="ggck_font" style="line-height: normal;">
       <p><s:property value="dto.bulletin.content" escape="false"/></p>  
     </div>
    <div class="ggck_list">
	    <dl>
	    	<dt>查看人员:</dt>
	    	<s:iterator value="dto.reads"  var="reads">
		          <dd class="linecolor">
               		<s:property escape="true" value="#reads.objectCname"/><span>查看时间:<s:date name="#reads.viewTime"  format="yyyy-MM-dd HH:mm:ss"/></span>
               	  </dd>
	        </s:iterator>
	     </dl>
	     <div class="clear"></div>  
    </div>
         <p  style="height:20px;" >&nbsp;</p>
     <div class="clear"></div>      
  </div>  
  </div>    
</div>
</div> 
